<meta charset="utf-8">
		<meta vary="User-Agent">
		<meta content="vi" http-equiv="content-language">
		<title><?php echo $site_title ?></title>
        <meta content="<?php echo $meta_desc ?>" name="description" />
		 <meta name="keywords" content="<?php echo $keywords?>" />
		<?php if (isset($image_src)) { ?>
			<meta property="og:image" content="<?php echo image_url($image_src) ?>" />
		<?php } ?>
		<meta property="og:title" content="<?php echo $site_title ?>" />
		<meta property="og:url" content="<?php echo site_url($this->uri->ruri_string()) ?>" />
		<meta property="og:description" content="<?php echo $meta_desc ?>" />
		<?php if (isset($image->video)) { ?>
			<meta property="og:type" content="<?php echo $image->video == 1 ? 'video' : $fb_namespace . ':photo' ?>">
			<?php if ($image->video == 1) { ?>
				<meta property="og:video:type" content="application/x-shockwave-flash">
				<meta property="og:video" content="<?php echo youtube_embed($image->video_id) ?>">
			<?php } ?>
		<?php } ?>
		<link href="<?php echo base_url() ?><?php echo $favicon ?>" rel="shortcut icon">
		<script type="text/javascript" src="<?php echo base_url() ?>javascript/jquery/jquery.min.js"></script>
		<script type="text/javascript" src="<?php echo base_url() ?>javascript/jquery/jquery.lazyload.min.js"></script>
		<!--<link type="text/css" href="<?php echo style_path() ?>haivl/css/ImageOverlay.css" rel="stylesheet">-->
		<link type="text/css" href="<?php echo style_path() ?>haivl/css/haivl.10.4.0.css" rel="stylesheet">
		<meta content="<?php echo $_SERVER['HTTP_HOST'] ?>" property="og:site_name">
		<meta content="<?php echo $fb_app_id ?>" property="fb:app_id">
		<script>
			var lock=false;
			function message(str){
				if(!lock){
					lock=true;
					alert(str);
					lock=false;
				}
			}
			$('.vote .voteUp a').live('click',function(){
				var t = $(this);
				$.ajax({
					url: '<?php echo url_create('site', 'vote', 'up') ?>/'+t.attr('data-id'),
					dataType: 'json',
					type: 'post',
					success: function(o)
					{
						if(o.state=='success'){
							t.addClass('upVoted');
							t.parent().prev().children(':first').removeClass('downVoted');
						}else
							message(o.message);
					}
				});
				return false;
			})
			$('.vote .voteDown a').live('click',function(){
				var t = $(this);
				$.ajax({
					url: '<?php echo url_create('site', 'vote', 'down') ?>/'+t.attr('data-id'),
					dataType: 'json',
					type: 'post',
					success: function(o)
					{
						if(o.state=='success'){
							t.addClass('downVoted');
							t.parent().next().children(':first').removeClass('upVoted');
						}else
							message(o.message);
					}
				});
				return false;
			})
			function reSetPosition()
			{
				var left = $('#loginPanel').position().left+$('#loginPanel').width();
				$('#loginPanel .beeperNub').css('left',left-18);
				$('#loginPanel ul').css('left',left-$('#loginPanel ul').width());
				left = $('#mainContainer').children(':first').position().left;
				$('#foo2_prev').css({
					left: left-20+'px'
				})
				$('#foo2_next').css({
					right: left-20+'px'
				})
			}
			
			$(document).ready(function(){
				$("img.lazy").lazyload();
				reSetPosition();
				$('#loginPanel a').hover(function(){
					$('#loginPanel ul').show();
					$('#loginPanel div').show();
				})
				$('#loginPanel ul').mouseout(function(){
					$('#loginPanel ul').hide();
					$('#loginPanel div').hide();
				})
			})
			$(window).resize(function(){
				reSetPosition();
			})
		</script>